﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace PMSystem.DataAccess.DataRepository
{
    public interface IRepository<T> : IDisposable
    {
        T GetById(int id);
        IQueryable<T> GetAll { get; }
        List<T> GetAllByCondition(Expression<Func<T, bool>> predicate);
        IQueryable<T> AllIncluding(params Expression<Func<T, object>>[] includeProperties);
        //T Find(int id);
        void InsertOrUpdate(T record);
        void Delete(int id);
        void Save();
    }
}
